package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * MotiRestypeRel entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "MOTI_RESTYPE_REL")
public class MotiRestypeRel implements java.io.Serializable {

    /**
     * 
     */
    private static final long serialVersionUID = -1479618306583567508L;

    // Fields    
    private Long id;
    private Long moitTypeId;
    private Long resTypeId;
    private Integer selfFlag;

    // Constructors

    /** default constructor */
    public MotiRestypeRel() {
    }

    /** minimal constructor */
    public MotiRestypeRel(Long id) {
        this.id = id;
    }

    /** full constructor */
    public MotiRestypeRel(Long id, Long moitTypeId, Long resTypeId) {
        this.id = id;
        this.moitTypeId = moitTypeId;
        this.resTypeId = resTypeId;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "MOTI_RESTYPE_REL_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "MOIT_TYPE_ID", precision = 18, scale = 0)
    public Long getMoitTypeId() {
        return this.moitTypeId;
    }

    public void setMoitTypeId(Long moitTypeId) {
        this.moitTypeId = moitTypeId;
    }

    @Column(name = "RES_TYPE_ID", precision = 18, scale = 0)
    public Long getResTypeId() {
        return this.resTypeId;
    }

    public void setResTypeId(Long resTypeId) {
        this.resTypeId = resTypeId;
    }

    @Override
    public String toString() {
        return "MotiRestypeRel [id=" + id + ", moitTypeId=" + moitTypeId + ", resTypeId=" + resTypeId + "]";
    }

    @Column(name = "SELF_FLAG", precision = 1, scale = 0)
    public Integer getSelfFlag() {
        return selfFlag;
    }

    public void setSelfFlag(Integer selfFlag) {
        this.selfFlag = selfFlag;
    }

}